package com.hucai.vo;

import lombok.Data;

import java.util.List;

/**
 * @author sujinglong
 * @date 2019/9/3
 * @description TODO
 */
@Data
public class GaodeVo {
    private String adcode;
    private String name;
    private String center;
    private String level;
    private List<GaodeVo> districts;

    private Integer getLevelInt(){
        if("country".equals(level)){
            return 0;
        }else if("province".equals(level)){
            return 1;
        }else if("city".equals(level)){
            return 2;
        }else if("district".equals(level)){
            return 3;
        }
        return -1;
    }
}
